1. Field of the Invention
This invention relates generally to integrated circuits, and in particular to an improved apparatus and method for switching between power supplies.
2. Background of the Invention
There are many environments today in which it is desirable to retain data in integrated circuits in the event that the primary, and typically external, power supply provided to an integrated circuit is interrupted or lost. In memory devices, for example, commercially available circuitry retains data in static random access memories (SRAMs) when primary power is removed. Representative examples of these devices, often referred to as "zero power circuits or devices," are described in the following patents: U.S. Pat. No. 4,122,359, entitled Memory Protection Arrangement; U.S. Pat. No. 4,451,742, entitled Power Supply Control for Integrated Circuit; U.S. Pat. No. 4,713,555, entitled Battery Charging Protection Circuit; and U.S. Pat. No. 5,099,453, entitled Configuration Memory for Programmable Logic Device. In a zero power circuit, the contents of the circuit are typically protected in the event that the primary power supply voltage to the circuit drops below a predetermined or selected voltage level that is normally defined to be a secondary or back-up voltage, such as a voltage supplied from a battery power supply.
In order to switch from the primary power supply to the secondary power supply upon failure of the primary power supply, it is necessary that the voltage level of both the primary and secondary power supplies be monitored and compared relative to each other. Comparators are particularly suited to this purpose. Comparator circuitry will sense when the primary power supply voltage provided to the circuit drops below the secondary power supply voltage by comparing these two voltages and the zero power circuit will accordingly cause the integrated circuit to receive power from the secondary power supply rather than from the primary power supply.
The comparator circuitry also senses when the primary power source becomes larger than the secondary, battery power source so that the zero power circuit will want to switch from the secondary power supply back to the primary power supply voltage. Such is the case when the primary power supply is turned on and is ramping up to its nominal voltage level. The secondary, battery back-up power supply will need to supply the integrated circuit until the primary power supply has exceeded the secondary power supply. A problem occurs, however, in the comparison performed by the comparator circuitry when a primary voltage input signal to the comparator circuitry corresponding to the primary power supply is a derived signal that does not immediately reflect the actual and current value of the primary power supply voltage. This primary voltage input signal, for instance, may be generated by passing the primary power supply voltage through an resistor-capacitive (RC) delay and thus may float until it is pulled to the primary power supply voltage level after a time determined by the amount of the RC delay.
During the time that the primary voltage input signal to the comparator is floating, defined by the RC delay, there is not immediately a differential between the primary and secondary voltage comparator inputs. The comparator circuitry output signal may be correspondingly indeterminate and thus "bounce" before it can settle to the proper level indicative of the difference between the primary and secondary voltage input signals. A temporary, improper comparator circuitry output signal can cause the integrated circuit to be powered by the secondary, battery power supply even when it is less than the primary power supply. Switching back to the battery while the primary power supply is higher than the battery level will cause an unnecessary high dynamic current to be drawn from the battery that will have the unfortunate consequence of reducing the battery life, particularly in those applications in which the external, principal power supply is switched on and off quite often.
From the foregoing description, it can be seen that there is a need in the art to ensure that the output signal of the comparator circuitry be immediately reflective of a true comparison between the primary and secondary power supplies, regardless of any RC delay associated with an input signal to the comparator circuitry, in order to prevent false switching between the primary and secondary power supplies. Addressing this problem of the prior art will provide a more stable switchover between primary and second power supplies as well as prolong the life of the internal secondary, battery back-up power supply of the integrated circuit.